/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.msk.wlhy.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.msk.common.utils.DictUtils;
import com.msk.sys.domain.DataEntity;
import com.msk.sys.domain.Office;
import com.msk.sys.domain.User;
import org.apache.commons.lang3.StringUtils;
import org.hibernate.validator.constraints.Length;

import java.util.Date;

/**
 * <p>[]</p>
 * <p>作者：shic</p>
 * <p>邮箱：shic@xiangyou.com</p>
 * <p>创建时间： 2019-04-01 </p>
 * <p>类说明：提示消息Entity </p>
 * <p>修改记录：</p>
 */
public class Information extends DataEntity<Information> {
	
	private static final long serialVersionUID = 1L;
	private User user;
	private String title;
	private  User auditUser;
	private Date auditDate;
	private String state;
    

    private String applyCode;
	public String getApplyCode() {
		return applyCode;
	}

	public void setApplyCode(String applyCode) {
		this.applyCode = applyCode;
	}
	private String details;
	private Office office;
	private String companyId;
	private String attribute01;
	private String attribute02;
	private String attribute03;
	private String attribute04;
	private String attribute05;
	private String attribute06;
	private Date attribute07;
	private Date attribute08;
	private String stateAlias;		// 转换后的查看状态
	private String delFlagAlias;		// 转换后的删除标志
	
	
		private Office company;
	
	public Office getCompany() {
		return company;
	}

	public void setCompany(Office company) {
		this.company = company;
	}

	public Information() {
		super();
	}

	public Information(String id){
		super(id);
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}
	
	@Length(min=0, max=100, message="消息标题长度必须介于 0 和 100 之间")
	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}
	
	@Length(min=0, max=100, message="审核人 id长度必须介于 0 和 100 之间")
	public  User getAuditUser() {
		return auditUser;
	}

	public void setAuditUser( User auditUser) {
		this.auditUser = auditUser;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getAuditDate() {
		return auditDate;
	}

	public void setAuditDate(Date auditDate) {
		this.auditDate = auditDate;
	}
	
	@Length(min=0, max=100, message="查看状态长度必须介于 0 和 100 之间")
	public String getState() {
		return state;
	}

	public void setState(String state) {
		this.state = state;
	}
	
	@Length(min=0, max=255, message="详情长度必须介于 0 和 255 之间")
	public String getDetails() {
		return details;
	}

	public void setDetails(String details) {
		this.details = details;
	}
	
	public Office getOffice() {
		return office;
	}

	public void setOffice(Office office) {
		this.office = office;
	}
	
	@Length(min=0, max=64, message="公司ID长度必须介于 0 和 64 之间")
	public String getCompanyId() {
		return companyId;
	}

	public void setCompanyId(String companyId) {
		this.companyId = companyId;
	}
	
	@Length(min=0, max=255, message="attribute01长度必须介于 0 和 255 之间")
	public String getAttribute01() {
		return attribute01;
	}

	public void setAttribute01(String attribute01) {
		this.attribute01 = attribute01;
	}
	
	@Length(min=0, max=255, message="attribute02长度必须介于 0 和 255 之间")
	public String getAttribute02() {
		return attribute02;
	}

	public void setAttribute02(String attribute02) {
		this.attribute02 = attribute02;
	}
	
	@Length(min=0, max=255, message="attribute03长度必须介于 0 和 255 之间")
	public String getAttribute03() {
		return attribute03;
	}

	public void setAttribute03(String attribute03) {
		this.attribute03 = attribute03;
	}
	
	@Length(min=0, max=255, message="attribute04长度必须介于 0 和 255 之间")
	public String getAttribute04() {
		return attribute04;
	}

	public void setAttribute04(String attribute04) {
		this.attribute04 = attribute04;
	}
	
	@Length(min=0, max=255, message="attribute05长度必须介于 0 和 255 之间")
	public String getAttribute05() {
		return attribute05;
	}

	public void setAttribute05(String attribute05) {
		this.attribute05 = attribute05;
	}
	
	@Length(min=0, max=255, message="attribute06长度必须介于 0 和 255 之间")
	public String getAttribute06() {
		return attribute06;
	}

	public void setAttribute06(String attribute06) {
		this.attribute06 = attribute06;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getAttribute07() {
		return attribute07;
	}

	public void setAttribute07(Date attribute07) {
		this.attribute07 = attribute07;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getAttribute08() {
		return attribute08;
	}

	public void setAttribute08(Date attribute08) {
		this.attribute08 = attribute08;
	}
	
	
	public String getStateAlias() {
		if(StringUtils.isBlank(stateAlias)){
			return DictUtils.getDictLabel(state, "yes_no", "");
		}
		return stateAlias;
	}

	public void setStateAlias(String stateAlias) {
		this.stateAlias = stateAlias;
	}
	public String getDelFlagAlias() {
		if(StringUtils.isBlank(delFlagAlias)){
			return DictUtils.getDictLabel(delFlag, "del_flag", "");
		}
		return delFlagAlias;
	}

	public void setDelFlagAlias(String delFlagAlias) {
		this.delFlagAlias = delFlagAlias;
	}
	
	
	public String getLogTitle() {
		return "提示消息";
	}
	
}